﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation"
             xmlns:Infrastructure="clr-namespace:LaserTag.Infrastructure;assembly=LaserTag.Infrastructure"
             xmlns:Controls="clr-namespace:Transitionals.Controls;assembly=Transitionals"
             xmlns:Transitions="clr-namespace:Transitionals.Transitions;assembly=Transitionals"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:LaserTag_Common_Behaviors="clr-namespace:LaserTag.Common.Behaviors;assembly=LaserTag.Common"
             xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
             xmlns:Zap="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.Zap;assembly=J832.Wpf.BagOTricksLib"
             xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
             xmlns:Controls1="clr-namespace:LaserTag.Common.Controls;assembly=LaserTag.Common"
             x:Class="LaserTag.Module.Vision.Views.VisionSetupView"
             d:DesignWidth="453.617"
             d:DesignHeight="306.28">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/LaserTag.Common;Component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="ButtonFocusVisual">
                <Setter Property="Control.Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Rectangle Stroke="Black"
                                       StrokeDashArray="1 2"
                                       StrokeThickness="1"
                                       Margin="2"
                                       SnapsToDevicePixels="true" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <LinearGradientBrush x:Key="ButtonNormalBackground"
                                 EndPoint="0,1"
                                 StartPoint="0,0">
                <GradientStop Color="#F3F3F3"
                              Offset="0" />
                <GradientStop Color="#EBEBEB"
                              Offset="0.5" />
                <GradientStop Color="#DDDDDD"
                              Offset="0.5" />
                <GradientStop Color="#CDCDCD"
                              Offset="1" />
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ButtonNormalBorder"
                             Color="#FF707070" />
            <Style x:Key="GlossyButtonStyle"
                   TargetType="{x:Type Button}">
                <Setter Property="FocusVisualStyle"
                        Value="{StaticResource ButtonFocusVisual}" />
                <Setter Property="Background"
                        Value="{StaticResource ButtonNormalBackground}" />
                <Setter Property="BorderBrush"
                        Value="{StaticResource ButtonNormalBorder}" />
                <Setter Property="BorderThickness"
                        Value="1" />
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
                <Setter Property="HorizontalContentAlignment"
                        Value="Center" />
                <Setter Property="VerticalContentAlignment"
                        Value="Center" />
                <Setter Property="Padding"
                        Value="1" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid>
                                <Rectangle Stroke="{x:Null}"
                                           Fill="{x:Null}"
                                           RadiusX="4"
                                           RadiusY="4"
                                           Opacity="0.645" />
                                <Rectangle x:Name="rectangle"
                                           Stroke="Black"
                                           RadiusX="4"
                                           RadiusY="4"
                                           Opacity="0.4">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="#B1FFFFFF" />
                                            <GradientStop Offset="0.5011" />
                                            <GradientStop Color="#27FFFFFF"
                                                          Offset="0.5" />
                                            <GradientStop Color="#05FFFFFF"
                                                          Offset="1" />
                                            <GradientStop Color="#6AFFFFFF"
                                                          Offset="0.039" />
                                            <GradientStop Color="#16FFFFFF"
                                                          Offset="0.901" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Border HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        Margin="{TemplateBinding Padding}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        BorderBrush="#FF5F5F5F"
                                        BorderThickness="1"
                                        CornerRadius="4"
                                        IsHitTestVisible="True">
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      RecognizesAccessKey="True" />
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocused"
                                         Value="true" />
                                <Trigger Property="ToggleButton.IsChecked"
                                         Value="true" />
                                <Trigger Property="IsEnabled"
                                         Value="false">
                                    <Setter Property="Foreground"
                                            Value="#ADADAD" />
                                </Trigger>
                                <Trigger Property="IsPressed"
                                         Value="True">
                                    <Setter Property="Opacity"
                                            TargetName="rectangle"
                                            Value="0.595" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <RadialGradientBrush x:Key="GlowBrush"
                                 Center="0.498,0.977"
                                 GradientOrigin="0.498,0.977"
                                 RadiusY="0.898">
                <GradientStop Color="#959BD7FF" />
                <GradientStop Color="#0D003AFF"
                              Offset="1" />
                <GradientStop Color="#7D0087FF"
                              Offset="0.392" />
            </RadialGradientBrush>
            <Style x:Key="ZapScrollerStyle"
                   TargetType="{x:Type Zap:ZapScroller}">
                <Setter Property="CommandItemTemplate">
                    <Setter.Value>
                        <DataTemplate DataType="{x:Type Zap:ZapCommandItem}">
                            <Button Content="{Binding Number}"
                                    Command="{Binding}">
                                <Button.Style>
                                    <Style TargetType="{x:Type Button}">
                                        <Setter Property="Width"
                                                Value="30" />
                                        <Setter Property="Height"
                                                Value="30" />
                                        <Style.BasedOn>
                                            <Style TargetType="{x:Type Button}">
                                                <Style.BasedOn>
                                                    <Style TargetType="{x:Type ButtonBase}">
                                                        <Setter Property="FocusVisualStyle">
                                                            <Setter.Value>
                                                                <Style>
                                                                    <Setter Property="Control.Template">
                                                                        <Setter.Value>
                                                                            <ControlTemplate>
                                                                                <Rectangle Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                                                                           StrokeDashArray="1 2"
                                                                                           StrokeThickness="1"
                                                                                           Margin="2"
                                                                                           SnapsToDevicePixels="True" />
                                                                            </ControlTemplate>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </Style>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background">
                                                            <Setter.Value>
                                                                <LinearGradientBrush EndPoint="0,1"
                                                                                     StartPoint="0,0">
                                                                    <GradientStop Color="#FFF3F3F3"
                                                                                  Offset="0" />
                                                                    <GradientStop Color="#FFEBEBEB"
                                                                                  Offset="0.5" />
                                                                    <GradientStop Color="#FFDDDDDD"
                                                                                  Offset="0.5" />
                                                                    <GradientStop Color="#FFCDCDCD"
                                                                                  Offset="1" />
                                                                </LinearGradientBrush>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="BorderBrush"
                                                                Value="#FF707070" />
                                                        <Setter Property="BorderThickness"
                                                                Value="1" />
                                                        <Setter Property="Foreground"
                                                                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
                                                        <Setter Property="HorizontalContentAlignment"
                                                                Value="Center" />
                                                        <Setter Property="VerticalContentAlignment"
                                                                Value="Center" />
                                                        <Setter Property="Padding"
                                                                Value="1" />
                                                        <Setter Property="Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="{x:Type ButtonBase}">
                                                                    <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome"
                                                                                                           SnapsToDevicePixels="True"
                                                                                                           Background="{TemplateBinding Background}"
                                                                                                           BorderBrush="{TemplateBinding BorderBrush}"
                                                                                                           RenderDefaulted="{TemplateBinding Button.IsDefaulted}"
                                                                                                           RenderMouseOver="{TemplateBinding IsMouseOver}"
                                                                                                           RenderPressed="{TemplateBinding IsPressed}">
                                                                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                                          Margin="{TemplateBinding Padding}"
                                                                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                                                          Content="{TemplateBinding Content}"
                                                                                          ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                                                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                                          RecognizesAccessKey="True" />
                                                                    </Microsoft_Windows_Themes:ButtonChrome>
                                                                    <ControlTemplate.Triggers>
                                                                        <Trigger Property="IsKeyboardFocused"
                                                                                 Value="True">
                                                                            <Setter Property="RenderDefaulted"
                                                                                    TargetName="Chrome"
                                                                                    Value="True" />
                                                                        </Trigger>
                                                                        <Trigger Property="ToggleButton.IsChecked"
                                                                                 Value="True">
                                                                            <Setter Property="RenderPressed"
                                                                                    TargetName="Chrome"
                                                                                    Value="True" />
                                                                        </Trigger>
                                                                        <Trigger Property="IsEnabled"
                                                                                 Value="False">
                                                                            <Setter Property="Foreground"
                                                                                    Value="#FFADADAD" />
                                                                        </Trigger>
                                                                    </ControlTemplate.Triggers>
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </Style.BasedOn>
                                            </Style>
                                        </Style.BasedOn>
                                    </Style>
                                </Button.Style>
                            </Button>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Zap:ZapScroller}">
                            <DockPanel>
                                <Zap:ZapDecorator x:Name="PART_ZapDecorator">
                                    <Zap:ZapPanel IsItemsHost="True" />
                                </Zap:ZapDecorator>
                            </DockPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <SolidColorBrush x:Key="TabControlNormalBorderBrush"
                             Color="#8C8E94" />
            <Style x:Key="AnimatedTabControlStyle"
                   TargetType="{x:Type TabControl}">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
                <Setter Property="Padding"
                        Value="4,4,4,4" />
                <Setter Property="BorderThickness"
                        Value="1" />
                <Setter Property="BorderBrush"
                        Value="{StaticResource TabControlNormalBorderBrush}" />
                <Setter Property="Background"
                        Value="#F9F9F9" />
                <Setter Property="HorizontalContentAlignment"
                        Value="Center" />
                <Setter Property="VerticalContentAlignment"
                        Value="Center" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabControl}">
                            <Grid ClipToBounds="true"
                                  SnapsToDevicePixels="true"
                                  KeyboardNavigation.TabNavigation="Local">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="ColumnDefinition0" />
                                    <ColumnDefinition x:Name="ColumnDefinition1"
                                                      Width="0" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="RowDefinition0"
                                                   Height="Auto" />
                                    <RowDefinition x:Name="RowDefinition1"
                                                   Height="*" />
                                </Grid.RowDefinitions>
                                <TabPanel x:Name="HeaderPanel"
                                          Margin="2,2,2,0"
                                          IsItemsHost="true"
                                          Panel.ZIndex="1"
                                          Grid.Column="0"
                                          Grid.Row="0"
                                          KeyboardNavigation.TabIndex="1" />
                                <Border x:Name="ContentPanel"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        Grid.Column="0"
                                        Grid.Row="1"
                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                        KeyboardNavigation.TabIndex="2"
                                        KeyboardNavigation.TabNavigation="Local">
                                    <ContentPresenter x:Name="PART_SelectedContentHost"
                                                      Margin="{TemplateBinding Padding}"
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      ContentSource="SelectedContent" />
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="TabStripPlacement"
                                         Value="Bottom">
                                    <Setter Property="Grid.Row"
                                            TargetName="HeaderPanel"
                                            Value="1" />
                                    <Setter Property="Grid.Row"
                                            TargetName="ContentPanel"
                                            Value="0" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition0"
                                            Value="*" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition1"
                                            Value="Auto" />
                                    <Setter Property="Margin"
                                            TargetName="HeaderPanel"
                                            Value="2,0,2,2" />
                                </Trigger>
                                <Trigger Property="TabStripPlacement"
                                         Value="Left">
                                    <Setter Property="Grid.Row"
                                            TargetName="HeaderPanel"
                                            Value="0" />
                                    <Setter Property="Grid.Row"
                                            TargetName="ContentPanel"
                                            Value="0" />
                                    <Setter Property="Grid.Column"
                                            TargetName="HeaderPanel"
                                            Value="0" />
                                    <Setter Property="Grid.Column"
                                            TargetName="ContentPanel"
                                            Value="1" />
                                    <Setter Property="Width"
                                            TargetName="ColumnDefinition0"
                                            Value="Auto" />
                                    <Setter Property="Width"
                                            TargetName="ColumnDefinition1"
                                            Value="*" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition0"
                                            Value="*" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition1"
                                            Value="0" />
                                    <Setter Property="Margin"
                                            TargetName="HeaderPanel"
                                            Value="2,2,0,2" />
                                </Trigger>
                                <Trigger Property="TabStripPlacement"
                                         Value="Right">
                                    <Setter Property="Grid.Row"
                                            TargetName="HeaderPanel"
                                            Value="0" />
                                    <Setter Property="Grid.Row"
                                            TargetName="ContentPanel"
                                            Value="0" />
                                    <Setter Property="Grid.Column"
                                            TargetName="HeaderPanel"
                                            Value="1" />
                                    <Setter Property="Grid.Column"
                                            TargetName="ContentPanel"
                                            Value="0" />
                                    <Setter Property="Width"
                                            TargetName="ColumnDefinition0"
                                            Value="*" />
                                    <Setter Property="Width"
                                            TargetName="ColumnDefinition1"
                                            Value="Auto" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition0"
                                            Value="*" />
                                    <Setter Property="Height"
                                            TargetName="RowDefinition1"
                                            Value="0" />
                                    <Setter Property="Margin"
                                            TargetName="HeaderPanel"
                                            Value="0,2,2,2" />
                                </Trigger>
                                <Trigger Property="IsEnabled"
                                         Value="false">
                                    <Setter Property="Foreground"
                                            Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0.5*" />
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Vertical"
                    d:LayoutOverrides="Height">
            <StackPanel Margin="0"
                        Orientation="Vertical">
                <TextBlock FontSize="64"
                           FontWeight="Bold"
                           Foreground="White"
                           Text="LASER TAG"
                           TextWrapping="Wrap" />
                <TextBlock FontSize="26.667"
                           Foreground="White"
                           Text="tag line here"
                           TextWrapping="Wrap"
                           Margin="187,-30,0,0" />
            </StackPanel>
            <StackPanel Orientation="Vertical">
                <Grid VerticalAlignment="Top">
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                d:LayoutOverrides="Height">
                        <Button Command="{Binding SetupCategorySelect}"
                                CommandParameter="{x:Static Infrastructure:SetupCategory.CameraSetup}"
                                Style="{DynamicResource BlankButton}"
                                Foreground="White"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                Margin="0,0,20,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock FontSize="34.667"
                                           FontWeight="Bold"
                                           Text="1."
                                           TextWrapping="Wrap"
                                           d:LayoutOverrides="Width"
                                           Margin="0,-4,0,0" />
                                <StackPanel HorizontalAlignment="Center">
                                    <TextBlock Margin="0"
                                               FontSize="18.667"
                                               FontWeight="Bold"
                                               Text="Select Camera"
                                               TextWrapping="Wrap"
                                               d:LayoutOverrides="Height" />
                                    <TextBlock Margin="0,-2,0,0"
                                               Text="to use for computer vision"
                                               TextWrapping="Wrap"
                                               d:LayoutOverrides="Height"
                                               FontSize="10.667"
                                               TextAlignment="Right"
                                               Padding="0,0,0,0" />
                                </StackPanel>
                            </StackPanel>
                        </Button>
                        <Button Command="{Binding SetupCategorySelect}"
                                CommandParameter="{x:Static Infrastructure:SetupCategory.VisionSetup}"
                                Style="{DynamicResource BlankButton}"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                Margin="-1,0,20,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock FontSize="34.667"
                                           FontWeight="Bold"
                                           Text="2."
                                           TextWrapping="Wrap"
                                           d:LayoutOverrides="Width"
                                           Foreground="White"
                                           Margin="0,-4,0,0" />
                                <StackPanel HorizontalAlignment="Center">
                                    <TextBlock Margin="0"
                                               FontSize="18.667"
                                               FontWeight="Bold"
                                               Text="Setup Vision"
                                               TextWrapping="Wrap"
                                               d:LayoutOverrides="Height"
                                               Foreground="White" />
                                    <TextBlock Margin="0,-2,0,0"
                                               FontSize="10.667"
                                               Text="to fine tune settings"
                                               TextWrapping="Wrap"
                                               d:LayoutOverrides="Height"
                                               Foreground="White"
                                               TextAlignment="Right"
                                               Padding="0,0,0,0" />
                                </StackPanel>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </Grid>
            </StackPanel>
        </StackPanel>
        <Grid x:Name="setupRegionParent"
              Margin="0"
              Grid.Row="1">
            <Zap:ZapScroller Grid.Column="0"
                             Regions:RegionManager.RegionName="{x:Static Infrastructure:RegionNames.SetupRegion}"
                             Style="{DynamicResource ZapScrollerStyle}"
                             Margin="0"
                             HorizontalContentAlignment="Stretch"
                             VerticalContentAlignment="Stretch" />
        </Grid>
        <StackPanel  Grid.Row="2"
                     VerticalAlignment="Center"
                     HorizontalAlignment="Left" Orientation="Horizontal">
            <ToggleButton Content="Toggle Graffiti"
                          Width="100"
                          Height="30"
                          Command="{Binding ToggleShowGraffiti}"
                          CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}" />
            <ListBox ItemsSource="{Binding AvailableScreens}"
                     SelectedValue="{Binding SelectedScreen}"
                     
                     Foreground="White"
                     VerticalAlignment="Bottom"
                     Margin="0"
                     Background="{x:Null}"
                     BorderBrush="{x:Null}"
                     HorizontalAlignment="Left"
                     Height="68"
                     FontFamily="Segoe UI Semibold"
                     FontSize="10.667">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Image Source="../Resources/monitor.png"
                               Width="64"
                               Height="64" ToolTip="{Binding DisplayName}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
        </StackPanel>
        <StackPanel  Grid.Row="2"
                     VerticalAlignment="Center"
                     HorizontalAlignment="Right"
                     Orientation="Horizontal">
            <ListBox ItemsSource="{Binding GraffitiEffects}"
                     SelectedValue="{Binding SelectedEffect}"
                     DisplayMemberPath="Value"
                     Foreground="White"
                     VerticalAlignment="Bottom"
                     Margin="0"
                     Background="{x:Null}"
                     BorderBrush="{x:Null}"
                     HorizontalAlignment="Left"
                     Height="60"
                     FontFamily="Segoe UI Semibold"
                     FontSize="10.667">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
        </StackPanel>
    </Grid>
</UserControl>
